---
title: Astro
description: Astro-specific configuration for Ultracite.
---

The Astro configuration has Astro-specific linting rule adjustments to handle the unique structure of Astro components, particularly around frontmatter scripts and component syntax.

## Installation

Add the Astro configuration to your `biome.jsonc`:

```jsonc title="biome.jsonc"
{
  "extends": ["ultracite/core", "ultracite/astro"]
}
```

## Overview

This configuration adjusts rules for Astro development:

- **Unused Variables/Imports**: Allows unused variables and imports in Astro files due to frontmatter constraints where variables may be used only in the template
- **Variable Declarations**: Relaxes `const` enforcement since Astro frontmatter may require reassignable variables
- **Import Types**: Disables explicit import type requirements for better compatibility
- **React-Specific Props**: Flags React-specific props like `className` since Astro uses standard HTML attributes

## Astro-Specific Rules

### Correctness

| Rule | Setting | Description |
|------|---------|-------------|
| `noUnusedVariables` | `off` | Allow unused variables in Astro files. Variables declared in frontmatter may only be used in the template section. |
| `noUnusedImports` | `off` | Allow unused imports in Astro files. Imports in frontmatter may only be used in the template section. |

### Style

| Rule | Setting | Description |
|------|---------|-------------|
| `useConst` | `off` | Allow `let` and `var` declarations. Astro component frontmatter may require reassignable variables. |
| `useImportType` | `off` | Disable explicit import type requirements for better compatibility with Astro's build system. |

### Suspicious

| Rule | Setting | Description |
|------|---------|-------------|
| `noReactSpecificProps` | `error` | Disallow React-specific props like `className` and `htmlFor` in Astro. Use `class` and `for` instead. |
